package o;

import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.huawei.appgallery.foundation.ui.framework.cardframe.bean.BaseCardBean;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Map;

public class ean {
    private static final Map<String, String> ॱ = new HashMap();

    static {
        ˎ("discover", "091402");
        ˎ("html", "091402");
        ˎ("h5_app", "091402");
    }

    private static LinkedHashMap<String, String> ˎ(long j, String str) {
        LinkedHashMap<String, String> linkedHashMap = new LinkedHashMap();
        linkedHashMap.put("detailID", str);
        linkedHashMap.put("time", String.valueOf(j));
        return linkedHashMap;
    }

    public static void ˏ(String str, long j, String str2) {
        if (TextUtils.isEmpty(str2)) {
            Logger.e("InfoFlowBIUtils", "detailID is empty");
        } else if (TextUtils.equals("091401", str) || TextUtils.equals("091402", str)) {
            if (Logger.ˎ()) {
                Logger.ˏ("InfoFlowBIUtils", String.format(Locale.ENGLISH, "reportKey:%s stayTime:%s detailID:%s", new Object[]{str, Long.valueOf(j), str2}));
            }
            dgh.ˋ(str, ˎ(j, str2));
        }
    }

    private static void ˎ(@NonNull String str, @NonNull String str2) {
        ॱ.put(str, str2);
    }

    public static String ˎ(BaseCardBean baseCardBean) {
        String str;
        if (baseCardBean != null) {
            Object ॱॱ = baseCardBean.ॱॱ();
            if (ॱॱ != null) {
                int indexOf = ॱॱ.indexOf(124);
                if (indexOf != -1) {
                    ॱॱ = ॱॱ.substring(0, indexOf);
                }
                str = (String) ॱ.get(ॱॱ);
                if (str != null) {
                    return "091401";
                }
                return str;
            }
        }
        str = null;
        if (str != null) {
            return str;
        }
        return "091401";
    }
}
